import ajax from '@/http/index';
import mockajax from './mockajax';


 const reqGetCategoryListData = () => ajax.get('/product/getBaseCategoryList');

 const reqGetclasssearch = (data)=>{
    // console.log(data);
   return ajax.post('/list',data)
 }

 const reqgetBannerList = () => mockajax.get('/bannerList');

 const reqgetFloorsList = () => mockajax.get('/floorstList');

 const reqgetDetaildata = (skuId) => ajax.get(`/item/${skuId}`);

 const reqgetComshopcart = (skuId,skuNum) => ajax.post(`/cart/addToCart/${skuId}/${skuNum}`)

 const reqgetupdatashopcart = () => ajax.get(`/cart/cartList`);

 const reqgetupdatacheckshopcart = (skuID,isChecked) => ajax.get(`/cart/checkCart/${skuID}/${isChecked}`);

 const reqgetupdatacheckallshopcart = (isChecked,skuIdList) => ajax.post(`/cart/batchCheckCart/${isChecked}`,skuIdList);

 const reqgetdelshopcart = (skuId) => ajax.delete(`/cart/deleteCart/${skuId}`)

 const reqgetdelshopcartlist = (skuIdList) => ajax.delete(`/cart/batchDeleteCart`, skuIdList)

 const reqgetphonecode = (phone) => ajax.get(`/user/passport/sendCode/${phone}`)

 const reqgetregister = (user) => ajax.post('/user/passport/register',user)

 const reqgetuserdata = (userdata) => ajax.post('/user/passport/login',userdata)

 const reqgetrmuserdata = () => ajax.get('/user/passport/logout')

 const reqgettradedata = () => ajax.get('/order/auth/trade')







 export default {reqgettradedata,reqgetrmuserdata,reqgetuserdata,reqgetregister,reqgetphonecode,reqgetdelshopcartlist,reqGetCategoryListData,reqGetclasssearch,reqgetBannerList,reqgetFloorsList,reqgetDetaildata,reqgetComshopcart,reqgetupdatashopcart,reqgetupdatacheckshopcart,reqgetupdatacheckallshopcart,reqgetdelshopcart}
